import character


# 控制人物属性

# 生成属性并展示
def gen_attribute(content):
    # 获得用户
    sender = content['sender']
    user_id = sender['user_id']
    attr_msg = character.init_attribute(user_id)
    attr_msg = str(attr_msg)
    attr_msg = attr_msg.replace('{', '')
    attr_msg = attr_msg.replace('}', '')
    attr_msg = attr_msg.replace('\'', '')
    return attr_msg

# 查看当前角色属性
def watch_attribute(content):
    sender = content['sender']
    user_id = sender['user_id']
    attr = character.get_attribute(user_id)
    attr_msg = str(attr)
    attr_msg = attr_msg.replace('{', '')
    attr_msg = attr_msg.replace('}', '')
    attr_msg = attr_msg.replace('\'', '')
    return attr_msg

def swap_attribute(content):
    sender = content['sender']
    user_id = sender['user_id']

